package com.sne.airways.route.pojo;

import com.sne.airways.basecore.pojo.BaseProperties;
import org.hibernate.annotations.*;
import org.hibernate.annotations.Cache;

import javax.persistence.*;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created with IntelliJ IDEA.
 * User: 卞京帅{bjslogin@gmail.com}
 * Date: 12-11-20
 * Time: 下午10:09
 * 航区
 */
@Entity
@Table(name = "EXP_AIRLINE")
@BatchSize(size=5)
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class ExpAirLine extends BaseProperties {

    @Id
    @GeneratedValue(generator = "system-uuid")
    @GenericGenerator(name = "system-uuid", strategy = "uuid")
    @Column(length = 45)
    public String lineId;//航区id

    @Column(length = 200)
    public String lineName;//航区名称

    @Column(length = 30)
    public String lineCode;//航区代码

    @Column(length = 400)
    public String lineDesc;//描述

    @Transient
    public String lineDetail;

    public String getLineId() {
        return lineId;
    }

    public void setLineId(String lineId) {
        this.lineId = lineId;
    }

    public String getLineName() {
        return lineName;
    }

    public void setLineName(String lineName) {
        this.lineName = lineName;
    }

    public String getLineCode() {
        return lineCode;
    }

    public void setLineCode(String lineCode) {
        this.lineCode = lineCode;
    }

    public String getLineDesc() {
        return lineDesc;
    }

    public void setLineDesc(String lineDesc) {
        this.lineDesc = lineDesc;
    }

    public String getLineDetail() {
        return this.lineCode + "-" + this.lineName;
    }

    public void setLineDetail(String lineDetail) {
        this.lineDetail = lineDetail;
    }
}
